<template>
    <div class="left-bottom">
        <div class="member">
            <img class="header" :src="data.header" />
            <p class="nickname">{{data.nickname}}的红包</p>
        </div>

        <div class="already" v-if="data.gain_money">
            <p>已开：+{{data.gain_money}}元</p>
            <div v-if="data.link" class="link" @click="showPage">
                <svg class="icon"><use xlink:href="#icon-tuiguanglianjie1"></use></svg>
                {{data.link.name}}
            </div>
        </div>

    </div>
</template>

<script>
    import store from "../../../../store";
    export default {
        name: "LeftBottom",
        props:{
            //红包数据
            data:{
                type:Object
            }
        },
        methods:{
            showPage(){
                store.commit("setPage",{
                    show:true,
                    src:this.data.link.link,
                    onClose:()=>{
                        store.commit("setPage",{show:false})
                    }
                });
            }
        }
    }
</script>

<style scoped lang="less" src="./left-bottom.less"></style>